package net.elive.tools;

import java.util.Random;

/**
 * 随机生成数字
 * @author Administrator
 *
 */
public class RandomNum {

	private static Random random = new Random();
	
	public RandomNum(){
		random  = new Random();
	}
	/**
	 * 随机产生int数据
	 * @return
	 */
	public static int randomInt(){
		return random.nextInt();
	}
	/**
	 * 根据范围产生int
	 * @param range
	 * @return
	 */
	public static int randomInt(int range){
		return random.nextInt(range);
	}
	/**
	 * 随机产生Long数据
	 * @return
	 */
	public static Long randomLong(){
		return random.nextLong();
	}
	/**
	 * 随机产生Float数据
	 * @return
	 */
	public static Float randomFloat(){
		return random.nextFloat();
	}
}
